//-----------------------------------------------------------------------------
// Copyright (c) 2011 David Waby
// Initially created on 31/10/2011
//-----------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Map inline functions
//---------------------------------------------------------------------------
inline Tile const * Map::GetTile(int const i_x, int const i_y) const
{
	// Make sure requested position is valid
	if ((i_x>=m_size[X]) || (i_x<0) || (i_y>=m_size[Y]) || (i_y<0))
		return NULL;

	return m_tiles[i_x][i_y];
}
//---------------------------------------------------------------------------
inline Tile * Map::GetTile(int const i_x, int const i_y)
{
	// Make sure requested position is valid
	if ((i_x>=m_size[X]) || (i_x<0) || (i_y>=m_size[Y]) || (i_y<0))
		return NULL;

	return m_tiles[i_x][i_y];
}
//---------------------------------------------------------------------------
inline Tile const * Map::GetTile(Point2 const * i_point2) const
{
	return GetTile((*i_point2)[X], (*i_point2)[Y]);
}
//---------------------------------------------------------------------------
inline Tile * Map::GetTile(Point2 const * i_point2)
{
	return GetTile((*i_point2)[X], (*i_point2)[Y]);
}
//---------------------------------------------------------------------------
inline Point2 const * Map::GetSize() const
{
	return &m_size;
}
//---------------------------------------------------------------------------
inline Point2 const * Map::GetStartPosition() const
{
	return &m_startPosition;
}
//---------------------------------------------------------------------------